newChat{ id="welcome",
	text = [[#WHITE#Welcome @playername@!  You have grown stronger since I last saw you]],
	answers = {
		{"Huh? How do you know me?", jump="talk"},
	}
}

newChat{ id="talk",
	text = [[#WHITE#*Sigh* Those wizards never portal correctly! Now you got amnesia. Anyways, could you do me a favor? I will loan you my cloak and the water orb if you succeed!]],
	answers = {
		{"Sure!", jump="talk1"},
		{"Sorry, I am busy."},
	}
}

newChat{ id="talk1",
	text = [[#WHITE#Thanks! I would like you to go over and defeat the fire elementals.  They have started quarreling with us since, well, the wizards arrived.  Show them that water elementals are stronger!]],
	answers = {
	{"Ok!", action=function(npc, player)
		player:grantQuest("destroy-fire")
	end}
	}
}

newChat{ id="quest",
	text = [[#WHITE#Thanks! The Orb of Water is past me.]],
	answers = {
	{"Ok!", action=function(npc, player)
		player:setQuestStatus("destroy-fire", engine.Quest.DONE)
		npc:move(34, 2, true)
	end}
	}
}

newChat{ id="false",
	text = [[#WHITE#You cannot pass!]],
	answers = {
	{"Ok!", action=function(npc, player)
		npc:move(34, 2, true)
	end}
	}
}

newChat{ id="waiting",
	text = [[#WHITE#So where is the proof?]],
	answers = {
	{"Errrr.... I am still working in it"}
	}
}

if game.player.faction == "water" then
	if game.player:isQuestStatus("destroy-fire", engine.Quest.COMPLETED) then
		return "quest"
	elseif game.player:isQuestStatus("destroy-fire", engine.Quest.DONE) then
		return ""
	elseif game.player:isQuestStatus("destroy-fire", engine.Quest.PENDING) then
		return "waiting"
	else
		return "welcome"
	end
else return "false"
end